home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / QuickDraw / Out of This GWorld / out.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-15  |  1.8 KB  |  94 lines  |  [TEXT/KAHL]

  1. #include <AppleEvents.h>
  2. #include <Types.h>
  3. #include <Resources.h>
  4. #include <QuickDraw.h>
  5. #include <Fonts.h>
  6. #include <Events.h>
  7. #include <Windows.h>
  8. #include <Menus.h>
  9. #include <TextEdit.h>
  10. #include <Dialogs.h>
  11. #include <Desk.h>
  12. #include <ToolUtils.h>
  13. #include <Memory.h>
  14. #include <SegLoad.h>
  15. #include <Files.h>
  16. #include <OSUtils.h>
  17. #include <OSEvents.h>
  18. #include <DiskInit.h>
  19. #include <Packages.h>
  20. #include <Traps.h>
  21. #include <QDOffscreen.h>
  22. #include <Palettes.h>
  23.  
  24. /* Constant Declarations */
  25.  
  26. #define    WWIDTH        360
  27. #define    WHEIGHT        360
  28.  
  29. #define WLEFT        (((screenBits.bounds.right - screenBits.bounds.left) - WWIDTH) / 2)
  30. #define WTOP        (((screenBits.bounds.bottom - screenBits.bounds.top) - WHEIGHT) / 2)
  31.  
  32. #define    TOTALCOLORS    255
  33. #define    SUN2MAC        (65535. / 255.)
  34. #define    SCALE        3
  35.  
  36. #define    STOP        0
  37. #define    START        1
  38. #define    FORWARD        0
  39. #define REVERSE        1
  40. #define    COLOR        0
  41. #define    GRAY        1
  42.  
  43. extern    WindowPtr        gWindow;
  44. extern    CTabHandle        gCTable;
  45. extern    GWorldPtr        gGWorld;
  46. extern    PixMapHandle    gPixMap;
  47. extern    PaletteHandle    gPalette;
  48.  
  49. extern    int                gCurrentPat;
  50. extern    int                gCurrentMove;
  51. extern    int                gCurrentDir;
  52. extern    int                gCurrentColor;
  53.  
  54. void initMac();
  55. void initVariables();
  56. void createWindow();
  57. void createGWorld();
  58. void createPalette();
  59. void updatePalette();
  60. void defineColorPalette();
  61. void defineGrayPalette();
  62. void createImage();
  63. void drawWindowBorder();
  64. void drawImage();
  65. void pollEvents();
  66. void cleanUp();
  67. void doAbout();
  68. void setRGB();
  69. void setColor();
  70.  
  71. void createColorScale();
  72. void createColorWheels();
  73. void createColorRings();
  74. void createColorGears();
  75. void createColorCurves();
  76. void createColorBalls();
  77. void createColorWave();
  78. void createColorText();
  79.  
  80. void animateCTable();
  81.  
  82. void testTriangle();
  83. void shadeWasher();
  84. void translate();
  85. void scale();
  86. void drawCircle();
  87. void drawWasher();
  88. void drawLine();
  89.  
  90. void setUpMenus();
  91. void adjustMenus();
  92. void enable();
  93. void handleMenu();
  94.